import React, { Component } from "react";
import Rfc from "./Rfc";
import Rcc from "./Rcc";

export default class App extends Component {
  state = {
    obj: {
      title: "函数组件",
      num: 100,
    },
  };
  render() {
    const { title, num } = this.state.obj;
    return (
      <div>
        <h1>App</h1>
        {/* <Rfc title="函数组件" num={1}></Rfc> */}
        {/* <Rfc num={num} title={title}></Rfc> */}
        <Rfc {...this.state.obj}></Rfc>
        <Rcc title="类组件"></Rcc>
      </div>
    );
  }
}
